<template>
  <span v-text="inventoryStr"></span>
</template>
<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps({
  value: {
    type: Number,
    default: 0,
  },
})

const inventoryStr = computed(() => {
  if (props.value === 0) {
    return '缺货'
  }
  if (props.value === 21) {
    return '充足'
  }
  return props.value
})
</script>
<style scoped lang="scss"></style>
